#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/types.h>
int main(int argc,char *argv[])
{
	struct stat buf;
	stat(argv[1],&buf);
	printf("  文件: '%s'\n",argv[1]);
	printf("  大小: %ld\t块: %ld\tIO 块: %ld\n",buf.st_size,buf.st_blocks,buf.st_blksize);
	printf("设备 : %u/%u\tInode: %u\t硬链接: %d\n",gnu_dev_major(buf.st_dev),gnu_dev_minor(buf.st_dev),buf.st_dev,buf.st_dev);
	printf("权限: %u\tUic: %u\tGid: %u\n",buf.st_mode,buf.st_uid,buf.st_gid);
	printf("最近访问: %ld\n",buf.st_atime);
}
